package com.ship.contract.bean;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ship.common.core.base.BaseBean;
import com.ship.common.core.base.Joinable;
import com.ship.common.core.mapping.Label;
import com.ship.common.core.mapping.SearchItem;
import com.ship.common.core.mapping.TableColumn;
import com.ship.common.core.validate.Update;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @author 31463
 */
@TableName("con_template")
@Data
public class ConTemplate extends BaseBean implements Joinable {


    private static final long serialVersionUID = 6128416752773127998L;

    @NotNull(message = "模板主键不能为空", groups = {Update.class})
    private Long id;


    /**
     *模板编号
     */
    @Label(value="模板编号")
    @SearchItem
    @TableColumn
    private String templateNumber;

    /**
     *模板名称
     */
    @Label(value="模板名称")
    @SearchItem
    @TableColumn
    private String templateName;

    /**
     *模板类型
     */
    @Label(value="模板类别",enumContent = "模板类型")
    @SearchItem
    @TableColumn
    private Integer templateType;

    /**
     *申请人
     */
    @Label(value="申请人")
    @SearchItem
    @TableColumn
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     *审批人
     */
    @Label(value="审批人")
    @SearchItem
    @TableColumn
    private String approvedBy;

    /**s
     *归档时间
     */
    @Label(value="归档时间")
    @SearchItem
    @TableColumn
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date archiveTime;

    /**
     *文件地址
     */
    @Label(value="文件地址")
    private String path;

    @Label(value = "申请原因")
    private String applyReason;
    @Label(value = "状态")
    @TableColumn
    private Integer status;
    @Label(value = "流程实例id")
    @TableColumn
    private String processInstanceId;

    @Override
    public String getLabel() {
        return null;
    }

    @Override
    public String getValue() {
        return null;
    }
}
